package com.smartscreen.baseinfomanage.entity;

import com.baomidou.mybatisplus.annotation.*;
import java.time.LocalDateTime;
import java.util.List;

@TableName("class")
public class SchoolClass {
    @TableId(value = "class_id", type = IdType.INPUT)
    private String classId;
    
    @TableField("name")
    private String name;
    
    @TableField("homeroom_teacher_id")
    private String homeroomTeacherId;
    
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    
    // 非数据库字段
    @TableField(exist = false)
    private Teacher homeroomTeacher;
    
    @TableField(exist = false)
    private List<Student> students;

    public SchoolClass() {}

    public SchoolClass(String classId, String name, String homeroomTeacherId) {
        this.classId = classId;
        this.name = name;
        this.homeroomTeacherId = homeroomTeacherId;
    }

    // Getters and Setters
    public String getClassId() { return classId; }
    public void setClassId(String classId) { this.classId = classId; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public String getHomeroomTeacherId() { return homeroomTeacherId; }
    public void setHomeroomTeacherId(String homeroomTeacherId) { this.homeroomTeacherId = homeroomTeacherId; }
    public Teacher getHomeroomTeacher() { return homeroomTeacher; }
    public void setHomeroomTeacher(Teacher homeroomTeacher) { this.homeroomTeacher = homeroomTeacher; }
    public List<Student> getStudents() { return students; }
    public void setStudents(List<Student> students) { this.students = students; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
    public LocalDateTime getUpdatedAt() { return updatedAt; }
    public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
}